package com.cloud.hotline.api.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.cloud.hotline.api.bean.HotlineRecordSearchCriteria;
import com.cloud.hotline.api.service.HotlineSearchService;
import com.cloud.hotline.common.result.Quokka;

@RestController
@RequestMapping("hotline/api/search")
public class HotlienSearchController {

	@Autowired
	private HotlineSearchService hotlineSearchService;

	@PostMapping("list")
	public Quokka list(@RequestBody HotlineRecordSearchCriteria criteria) {
		return new Quokka(true, hotlineSearchService.searchPage(criteria));
	}
}
